include_defs('//lib/maven.defs')

define_license(name = 'antlr')
define_license(name = 'Apache1.1')
define_license(name = 'Apache2.0')
define_license(name = 'args4j')
define_license(name = 'automaton')
define_license(name = 'bouncycastle')
define_license(name = 'CC-BY3.0')
define_license(name = 'clippy')
define_license(name = 'codemirror-minified')
define_license(name = 'codemirror-original')
define_license(name = 'diffy')
define_license(name = 'fetch')
define_license(name = 'h2')
define_license(name = 'jgit')
define_license(name = 'jsch')
define_license(name = 'MPL1.1')
define_license(name = 'moment')
define_license(name = 'OFL1.1')
define_license(name = 'ow2')
define_license(name = 'page.js')
define_license(name = 'polymer')
define_license(name = 'postgresql')
define_license(name = 'prologcafe')
define_license(name = 'promise-polyfill')
define_license(name = 'protobuf')
define_license(name = 'PublicDomain')
define_license(name = 'silk_icons')
define_license(name = 'slf4j')
define_license(name = 'xz')

define_license(name = 'DO_NOT_DISTRIBUTE')

maven_jar(
  name = 'gwtorm_client',
  id = 'com.google.gerrit:gwtorm:1.15',
  bin_sha1 = '26a2459f543ed78977535f92e379dc0d6cdde8bb',
  src_sha1 = '9524088d6e46e299b12791cb1a63c4ba6a478b96',
  license = 'Apache2.0',
)

java_library(
  name = 'gwtorm',
  exported_deps = [':gwtorm_client'],
  deps = [':protobuf'],
  visibility = ['PUBLIC'],
)

maven_jar(
  name = 'gwtjsonrpc',
  id = 'com.google.gerrit:gwtjsonrpc:1.8',
  bin_sha1 = 'c264bf2f543cffddceada5cdf031eea06dbd44a0',
  src_sha1 = 'cab9117b6349c04c9fdcb5b31434b3a20fd36062',
  license = 'Apache2.0',
)

maven_jar(
  name = 'gson',
  id = 'com.google.code.gson:gson:2.6.2',
  sha1 = 'f1bc476cc167b18e66c297df599b2377131a8947',
  license = 'Apache2.0',
)

maven_jar(
  name = 'guava',
  id = 'com.google.guava:guava:19.0',
  sha1 = '6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9',
  license = 'Apache2.0',
)

maven_jar(
  name = 'guava-retrying',
  id = 'com.github.rholder:guava-retrying:2.0.0',
  sha1 = '974bc0a04a11cc4806f7c20a34703bd23c34e7f4',
  license = 'Apache2.0',
  deps = [':jsr305'],
)

maven_jar(
  name = 'jsr305',
  id = 'com.google.code.findbugs:jsr305:2.0.2',
  sha1 = '516c03b21d50a644d538de0f0369c620989cd8f0',
  license = 'Apache2.0',
  attach_source = False,
  # Whitelist lib targets that have jsr305 as a dependency. Generally speaking
  # Gerrit core should not depend on these annotations, and instead use
  # equivalent annotations in com.google.gerrit.common.
  visibility = ['//lib:guava-retrying'],
)

maven_jar(
  name = 'velocity',
  id = 'org.apache.velocity:velocity:1.7',
  sha1 = '2ceb567b8f3f21118ecdec129fe1271dbc09aa7a',
  license = 'Apache2.0',
  deps = [
    '//lib/commons:collections',
    '//lib/commons:lang',
    '//lib/commons:oro',
  ],
  exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
)

maven_jar(
  name = 'jsch',
  id = 'com.jcraft:jsch:0.1.53',
  sha1 = '658b682d5c817b27ae795637dfec047c63d29935',
  license = 'jsch',
)

maven_jar(
  name = 'servlet-api-3_1',
  id = 'org.apache.tomcat:tomcat-servlet-api:8.0.24',
  sha1 = '5d9e2e895e3111622720157d0aa540066d5fce3a',
  license = 'Apache2.0',
  exclude = ['META-INF/NOTICE', 'META-INF/LICENSE'],
)

maven_jar(
  name = 'args4j',
  id = 'args4j:args4j:2.0.26',
  sha1 = '01ebb18ebb3b379a74207d5af4ea7c8338ebd78b',
  license = 'args4j',
)

maven_jar(
  name = 'mime-util',
  id = 'eu.medsea.mimeutil:mime-util:2.1.3',
  sha1 = '0c9cfae15c74f62491d4f28def0dff1dabe52a47',
  license = 'Apache2.0',
  exclude = ['LICENSE.txt', 'README.txt'],
  attach_source = False,
)

maven_jar(
  name = 'juniversalchardet',
  id = 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3',
  sha1 = 'cd49678784c46aa8789c060538e0154013bb421b',
  license = 'MPL1.1',
)

maven_jar(
  name = 'automaton',
  id = 'dk.brics.automaton:automaton:1.11-8',
  sha1 = '6ebfa65eb431ff4b715a23be7a750cbc4cc96d0f',
  license = 'automaton',
)

maven_jar(
  name = 'pegdown',
  id = 'org.pegdown:pegdown:1.4.2',
  sha1 = 'd96db502ed832df867ff5d918f05b51ba3879ea7',
  license = 'Apache2.0',
  deps = [':grappa'],
)

maven_jar(
  name = 'grappa',
  id = 'com.github.parboiled1:grappa:1.0.4',
  sha1 = 'ad4b44b9c305dad7aa1e680d4b5c8eec9c4fd6f5',
  license = 'Apache2.0',
  deps = [
    ':jitescript',
    '//lib/ow2:ow2-asm',
    '//lib/ow2:ow2-asm-analysis',
    '//lib/ow2:ow2-asm-tree',
    '//lib/ow2:ow2-asm-util',
  ],
)

maven_jar(
  name = 'jitescript',
  id = 'me.qmx.jitescript:jitescript:0.4.0',
  sha1 = '2e35862b0435c1b027a21f3d6eecbe50e6e08d54',
  license = 'Apache2.0',
  visibility = ['//lib:grappa'],
)

maven_jar(
  name = 'derby',
  id = 'org.apache.derby:derby:10.11.1.1',
  sha1 = 'df4b50061e8e4c348ce243b921f53ee63ba9bbe1',
  license = 'Apache2.0',
  attach_source = False,
)

maven_jar(
  name = 'h2',
  id = 'com.h2database:h2:1.3.176',
  sha1 = 'fd369423346b2f1525c413e33f8cf95b09c92cbd',
  license = 'h2',
)

maven_jar(
  name = 'postgresql',
  id = 'postgresql:postgresql:9.1-901-1.jdbc4',
  sha1 = '9bfabe48876ec38f6cbaa6931bad05c64a9ea942',
  license = 'postgresql',
  attach_source = False,
)

maven_jar(
  name = 'protobuf',
  # Must match version in gwtorm/pom.xml.
  id = 'com.google.protobuf:protobuf-java:2.5.0',
  bin_sha1 = 'a10732c76bfacdbd633a7eb0f7968b1059a65dfa',
  src_sha1 = '7a27a7fc815e481b367ead5df19b4a71ace4a419',
  license = 'protobuf',
)

# Test-only dependencies below.

maven_jar(
  name = 'jimfs',
  id = 'com.google.jimfs:jimfs:1.0',
  sha1 = 'edd65a2b792755f58f11134e76485a928aab4c97',
  license = 'DO_NOT_DISTRIBUTE',
  deps = [':guava'],
)

maven_jar(
  name = 'junit',
  id = 'junit:junit:4.11',
  sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
  license = 'DO_NOT_DISTRIBUTE',
  exported_deps = [':hamcrest-core'],
)

maven_jar(
  name = 'hamcrest-core',
  id = 'org.hamcrest:hamcrest-core:1.3',
  sha1 = '42a25dc3219429f0e5d060061f71acb49bf010a0',
  license = 'DO_NOT_DISTRIBUTE',
  visibility = ['//lib:junit'],
)

maven_jar(
  name = 'truth',
  id = 'com.google.truth:truth:0.28',
  sha1 = '0a388c7877c845ff4b8e19689dda5ac9d34622c4',
  license = 'DO_NOT_DISTRIBUTE',
  exported_deps = [
    ':guava',
    ':junit',
  ],
)

maven_jar(
  name = 'tukaani-xz',
  id = 'org.tukaani:xz:1.4',
  sha1 = '18a9a2ce6abf32ea1b5fd31dae5210ad93f4e5e3',
  license = 'xz',
  attach_source = False,
  visibility = ['//gerrit-server:server'],
)

maven_jar(
  name = 'javassist',
  id = 'org.javassist:javassist:3.18.1-GA',
  sha1 = 'd9a09f7732226af26bf99f19e2cffe0ae219db5b',
  license = 'DO_NOT_DISTRIBUTE',
)
